package com.fw.application.controller;


import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.fw.application.controller.base.BaseController;
import com.fw.mes.Result;
import com.fw.system.web.service.ITbBannerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import static com.fw.mes.ResultUtils.success;

/**
 * <p>
 * banner 前端控制器
 * </p>
 *
 * @author
 * @since 2021-11-24
 */
@RestController
@RequestMapping("/banner")
@CrossOrigin
@Api(tags = "輪播圖")
public class TbBannerController implements BaseController {

    @Autowired
    private ITbBannerService bannerService;


    @GetMapping("/getList")
    @ApiOperation("得到banner列表")
    public Result getList() {

        return success(bannerService.list());
    }

    @GetMapping("/getById")
    @ApiOperation("得到banner详情")
    public Result getById(@RequestParam String id) {

        return success(bannerService.getById(id));
    }
}

